\vspace{0.3cm}
-\noindent{\bf Possible Error Codes:} {\tt VM\_BAD\_POWER\_STATE}
+\noindent{\bf Possible Error Codes:} {\tt VM\_BAD\_POWER\_STATE}, {\tt
+VM\_HVM\_REQUIRED}
\vspace{0.6cm}
\subsubsection{RPC name:~pause}
\begin{verbatim}VM_BAD_POWER_STATE(vm, expected, actual)\end{verbatim}
\begin{center}\rule{10em}{0.1pt}\end{center}
+\subsubsection{VM\_HVM\_REQUIRED}
+
+HVM is required for this operation
+
+\vspace{0.3cm}
+{\bf Signature:}
+\begin{verbatim}VM_HVM_REQUIRED(vm)\end{verbatim}
+\begin{center}\rule{10em}{0.1pt}\end{center}
+
\newpage
start_paused = start_paused)
def VM_start(self, session, vm_ref, start_paused):
- return XendTask.log_progress(0, 100, do_vm_func,
- "domain_start", vm_ref,
- start_paused = start_paused)
-
+ try:
+ return XendTask.log_progress(0, 100, do_vm_func,
+ "domain_start", vm_ref,
+ start_paused = start_paused)
+ except HVMRequired, exn:
+ return xen_api_error(['VM_HVM_REQUIRED', vm_ref])
+
def VM_suspend(self, session, vm_ref):
return XendTask.log_progress(0, 100, do_vm_func,
"domain_suspend", vm_ref)
self.info['start_time'] = time.time()
self._stateSet(DOM_STATE_RUNNING)
- except (RuntimeError, VmError), exn:
+ except VmError, exn:
+ log.exception("XendDomainInfo.initDomain: exception occurred")
+ if self.image:
+ self.image.cleanupBootloading()
+ raise exn
+ except RuntimeError, exn:
log.exception("XendDomainInfo.initDomain: exception occurred")
if self.image:
self.image.cleanupBootloading()
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#============================================================================
# Copyright (C) 2004, 2005 Mike Wray <mike.wray@hp.com>
+# Copyright (c) 2006, 2007 XenSource Inc.
#============================================================================
from xmlrpclib import Fault
"""Vm construction error."""
pass
+class HVMRequired(VmError):
+ def __init__(self):
+ XendError.__init__(self,
+ 'HVM guest support is unavailable: is VT/AMD-V '
+ 'supported by your CPU and enabled in your BIOS?')
+
XEND_ERROR_AUTHENTICATION_FAILED = ('ELUSER', 'Authentication Failed')
XEND_ERROR_SESSION_INVALID = ('EPERMDENIED', 'Session Invalid')
import xen.lowlevel.xc
from xen.xend.XendConstants import REVERSE_DOMAIN_SHUTDOWN_REASONS
-from xen.xend.XendError import VmError, XendError
+from xen.xend.XendError import VmError, XendError, HVMRequired
from xen.xend.XendLogging import log
from xen.xend.XendOptions import instance as xenopts
from xen.xend.server.netif import randomMAC
info = xc.xeninfo()
if 'hvm' not in info['xen_caps']:
- raise VmError("HVM guest support is unavailable: is VT/AMD-V "
- "supported by your CPU and enabled in your BIOS?")
+ raise HVMRequired()
self.dmargs = self.parseDeviceModelArgs(vmConfig)
self.device_model = vmConfig['platform'].get('device_model')
msgid ""
msgstr ""
"Project-Id-Version: Xen-xm 3.0\n"
-"PO-Revision-Date: 2007-02-20 15:22+0000\n"
+"PO-Revision-Date: 2007-03-10 23:17+0000\n"
"Last-Translator: Ewan Mellor <ewan@xensource.com>\n"
"Language-Team: xen-devel <xen-devel@lists.xensource.com>\n"
"MIME-Version: 1.0\n"
msgid "VM_BAD_POWER_STATE"
msgstr "The VM must be %(2)s to perform the requested operation (it is currently %(3)s)."
+
+msgid "VM_HVM_REQUIRED"
+msgstr "HVM guest support is unavailable: is VT/AMD-V supported by your CPU and enabled in your BIOS?"